<template>
  <div class="common-box">
    <div class="common-box-item L-R" @click="handleItemClick('H')">
      <img :src="left" alt="" />
      <span>最小化</span>
    </div>
    <div class="common-box-item T-B" @click="handleItemClick('V')">
      <img :src="right" alt="" />
      <span>退出授课</span>
    </div>
  </div>
</template>

<script>
import left from '../../../assets/teaching/minisize.png';
import right from '../../../assets/teaching/close.png';

export default {
  data() {
    return {
      left,
      right,
    };
  },
  methods: {
    handleItemClick(param) {
      this.$emit('onItemClick', param);
    },
  },
};
</script>
<style lang="less" scoped>
.common-box {
  display: flex;
  width: 80%;
  justify-content: center;
  user-select: none;

  .common-box-item {
    cursor: pointer;
    width: 220px;
    height: 220px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    & > img {
      width: 120px;
    }

    & > span {
      font-family: PingFangSC, PingFang SC;
      font-weight: 400;
      font-size: 22px;
      color: #1a1a1a;
      text-align: left;
      font-style: normal;
      margin-top: 16px;
    }
  }

  .L-R {
    background: rgba(255, 133, 0, 0.05);
    margin-right: 60px;
  }

  .T-B {
    background: rgba(50, 112, 255, 0.05);
  }
}
</style>
